package com.efast.dmom.mgmt.dao.mes.qm;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.efast.dmom.mgmt.bean.mes.qm.QMCheckAreaBean;
import com.efast.dmom.mgmt.bean.mes.qm.QMCheckDefectCodeBean;
import com.efast.dmom.mgmt.bean.mes.qm.QMCheckDefectSaveBean;
import com.efast.dmom.mgmt.bean.mes.qm.QMCheckItemBean;
import com.efast.dmom.mgmt.bean.mes.qm.QMCheckPartBean;
import com.efast.dmom.mgmt.bean.mes.qm.QMRepairRecordSaveBean;

public interface QMDefectDao {

	public List<QMCheckAreaBean> getCheckAreaByStationId(@Param(value = "stationId") Integer stationId);

	public List<QMCheckPartBean> getCheckPartsByAreaId(@Param(value = "areaId") Integer areaId);

	public List<QMCheckItemBean> getCheckItemsByPartId(@Param(value = "partId") Integer partId);

	public List<QMCheckDefectCodeBean> getDefectCodeByItemId(@Param(value = "itemId") Integer itemId);

	public void saveDefectRecord(List<QMCheckDefectSaveBean> list);

	/*
	 * 更新缺陷状态
	 * **/
	public void deleteDefectByDefectId(QMCheckDefectSaveBean saveBean);
	
	/*
	 * 删除缺陷通过缺陷id
	 * **/
	public void deleteDefect(QMCheckDefectSaveBean saveBean);
	
	void RepairRecordStatus(QMCheckDefectSaveBean saveBean);
	
	public void saveRepairRecord(List<QMRepairRecordSaveBean> saveBean);
	
	public Integer showDefectSection(@Param(value = "stationId") Integer stationId);
	
	Integer selectRowNumByLot(@Param(value = "lotName") String lotName);
	// 更新缺陷记录中关于质量门的问题
	void updateDefectRecord(Map<String,Object> map);
}
